import { apiHttp } from '/@/utils/axios';

interface ColorConfig {
  color: string;
  text: string;
}
export const ColorMapping:ColorConfig[] = [
  { color: '#2db7f5' , text:'直接转办'},
  { color: '#03B514' , text:'通过'},
  { color: '#f50' , text:'不通过'},
  { color: '#ccc' , text:'取消'}
]

export interface aType {
  code: string;
  itemName: string;
}

export const comTypes:aType[] = [
  {code:'QY_TYPE_SG' , itemName:'建筑业企业资质'},
  {code:'QY_TYPE_KC' , itemName:'勘察企业资质'},
  {code:'QY_TYPE_SJ' , itemName:'设计企业资质'},
  {code:'QY_TYPE_JL' , itemName:'监理企业资质'},
  //{code:'QY_TYPE_JSDW' , itemName:'建设单位'},
  //{code:'QY_TYPE_YBHLT' , itemName:'预拌混凝土企业'},
  {code:'QY_TYPE_GCZLJC' , itemName:'工程质量检测资质'},
  {code:'QY_TYPE_ZJZX' , itemName:'工程造价咨询资质'},
  {code:'QY_TYPE_FDCKF' , itemName:'房地产开发企业资质'},
  {code:'QY_TYPE_FDCPG' , itemName:'房地产估价机构备案资质'},
  //{code:'QY_TYPE_ZBDL' , itemName:'招标代理机构'},
  //{code:'QY_TYPE_WYFU' , itemName:'物业服务企业'},
  //{code:'QY_TYPE_JJJG' , itemName:'房地产经纪机构'},
  //{code:'QY_TYPE_ST' , itemName:'施工图审查机构'}
];

export const comTypesGs:aType[] = [  //公示单独的
  {code:'QY_TYPE_SG' , itemName:'建筑业企业资质'},
  {code:'QY_TYPE_KC' , itemName:'勘察企业资质'},
  {code:'QY_TYPE_SJ' , itemName:'设计企业资质'},
  {code:'QY_TYPE_JL' , itemName:'监理企业资质'},
  {code:'QY_TYPE_GCZLJC' , itemName:'工程质量检测资质'},
  {code:'QY_TYPE_ZJZX' , itemName:'工程造价咨询资质'},
  {code:'QY_TYPE_FDCKF' , itemName:'房地产开发企业资质'}
];

export const personTypes:aType[] = [
  {code:'APP_XYPJ_TYPE_ZJ' , itemName:'注册造价师'},
  {code:'APP_XYPJ_TYPE_KCRY' , itemName:'勘察人员'},
  {code:'APP_XYPJ_TYPE_SJRY' , itemName:'设计人员'},
  {code:'APP_XYPJ_TYPE_ZCJZS' , itemName:'注册建造师'},
  {code:'APP_XYPJ_TYPE_ZCJLS' , itemName:'注册监理师'},
  {code:'APP_XYPJ_TYPE_TSRY' , itemName:'施工图审查机构从业人员'},
  {code:'APP_XYPJ_TYPE_GJRY' , itemName:'房地产估价机构从业人员'},
  {code:'APP_XYPJ_TYPE_JJRY' , itemName:'房地产经纪机构从业人员'},
  {code:'APP_XYPJ_TYPE_ZBRY' , itemName:'招标代理机构从业人员'}

]


export interface pageConfig {
  current: number;
  total: number;
  pageSize: number;
}


export const getAptNoticeList = params => {
  return apiHttp.post({ url: '/notice/aptApply', params });
}
export const getAptqualItem = params => {
  return apiHttp.post({ url: '/notice/qualItem', params });
}

export const getAptSafetyList = params => {
  return apiHttp.post({ url: '/notice/safetyApply', params });
}

export const getAptQualList = params => {
  return apiHttp.post({ url: '/notice/qualApply', params });
}

export const getAuthDomain = () => {   //组织域
  return apiHttp.post({ url: '/notice/authDomain' });
}

export const getforeignQyList = params => {   //进疆登记企业信息公示
  return apiHttp.post({ url: '/foreign/qy', params });
}

export const getforeignZjList = params => {   //造价企业承揽业务信息公示
  return apiHttp.post({ url: '/foreign/zj', params });
}




//下面是旧项目没有修改的

export const getAptCreditRecordList = params => {
  return apiHttp.post({ url: '/credit/creditRecord', params });
}

export const getAptScoreCompanyList = params => {
  return apiHttp.post({ url: '/credit/creditScoreCompany', params });
}

export const getAptScorePersonList = params => {
  return apiHttp.post({ url: '/credit/creditScorePerson', params });
}
